package aaaSegment;

import java.util.ArrayList;
import java.util.List;

import com.attilax.json.JSONArray;
import com.attilax.lang.text.RegExpChar4splitor;
import com.attilax.lang.text.strUtil;

public class sentenceUtil {

	public static 	String[]  split(String s) {
	
		List<String> li_splitor = new ArrayList<String>();
		li_splitor.add("-");
		li_splitor.add("_");
		li_splitor.add("/");
		li_splitor.add("\r");
		li_splitor.add("\n");
		li_splitor.add(RegExpChar4splitor.dollar);
		li_splitor.add(RegExpChar4splitor.dot);
		
		String byaodyes = "，。：”＂”“！·～～#@%……&×（）";
		byaodyes = byaodyes +" ——《》·；‘、【】";
		byaodyes = byaodyes + "『』,;'-=`<>";
		byaodyes = byaodyes + "\"_~!@#$%^&_' ";
		char[] a = byaodyes.toCharArray();
		for (char c : a) {
			if (!li_splitor.contains(String.valueOf(c)))
				li_splitor.add(String.valueOf(c));
		}
		
		
		String regexpEdsChar="[]():?$^|{}+|";
		char[] a3=regexpEdsChar.toCharArray();
		for (char c : a3) {
			String s2="\\"+String.valueOf(c);
			if (!li_splitor.contains(s2))
				li_splitor.add(s2);
		}
		
		
		System.out.println(JSONArray.fromObject(li_splitor).toString(2));
		
		
		List<String> li = new ArrayList<String>();
		String[] a2 = strUtil.splitByMultiChar(s, li_splitor);
		return a2;
	}

}
